package cn.ljlao.mall.product.goods.service;

import cn.ljlao.common.utils.PageUtils;
import cn.ljlao.mall.product.goods.entity.AttrAttrgroupRelationEntity;
import cn.ljlao.mall.product.goods.vo.AttrRspVo;
import cn.ljlao.mall.product.goods.vo.AttrVo;
import com.baomidou.mybatisplus.extension.service.IService;
import cn.ljlao.mall.product.goods.entity.AttrEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author LiuZhen
 * @email ljlao@vip.qq.com
 * @date 2020-10-14 13:51:59
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    /**
     * 保存商品属性以及关联关系
     * @param attr
     */
    void saveDetails(AttrVo attr);

    /**
     * 分页查询
     * @param params
     * @param catelogId
     * @param type
     * @return
     */
    PageUtils baseList(Map<String, Object> params, Long catelogId, String type);

    /**
     * 查询规格详情
     * @param attrId
     * @return
     */
    AttrRspVo getInfo(Long attrId);

    /**
     * 修改规格
     * @param attr
     */
    void updateByDetial(AttrVo attr);

    List<AttrEntity> attrRelation(Long attrgroupId);

    void deleteAttrRelation(List<AttrAttrgroupRelationEntity> list);

    PageUtils noAttrRelation(Long attrgroupId, Map<String, Object> params);


    List<Long> selectSearchAttrs(List<Long> attrIds);

    void saveaa();
}

